﻿using Mysoft.Common.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Mysoft.Dto.Basic
{
    public class PageCondition
    {
      

        private const int DefaultPageSize = 10;
        private int PageSize;

        public Dictionary<string, QueryOrderBy>? orderBy { get; set; }

        public int pageIndex { get; set; }
        public int pageSize
        {
            get
            {
                if (PageSize == 0)
                {
                    return DefaultPageSize;
                }
                else
                    return PageSize;
            }
            set
            {
                this.PageSize = value;
            }
        }
    }
}
